import request from '@/utils/request_admin'

const baseURL = '/audit/posts'

export default {
  getPostsAuditList(page, size, data) {
    return request({
      url: `${baseURL}/list/${page}/${size}`,
      method: 'POST',
      data,
    })
  },
  getUserInfo(userId) {
    return request({
      url: `${baseURL}/userInfo`,
      method: 'GET',
      params: {
        userId,
      },
    })
  },
  auditSuccess(auditPostsId, userNumber) {
    return request({
      url: `${baseURL}/auditSuccess`,
      method: 'GET',
      params: {
        auditPostsId,
        userNumber,
      },
    })
  },
  auditError(auditPostsId, userNumber, errorMessage) {
    return request({
      url: `${baseURL}/auditError`,
      method: 'GET',
      params: {
        auditPostsId,
        userNumber,
        errorMessage,
      },
    })
  },
  getPostsInfo(postsId) {
    return request({
      url: `${baseURL}/info`,
      method: 'POST',
      data: postsId,
    })
  },
  getPostsById(auditPostsId) {
    return request({
      url: `${baseURL}/${auditPostsId}`,
      method: 'GET',
    })
  },
}
